package JAVA;

import java.util.Scanner;

public class work385 {
    public static void main(String[] args) {
        int sum=0;
        for (int i=0;i<5;i++){
            Scanner input=new Scanner(System.in);
            System.out.println("请输入年龄");
            int age= input.nextInt();
            if (age<0||age>130){
                System.out.println("输入有误");
                break;
            }
            sum+=age;
        }
        System.out.println("平均年龄："+sum/5);
    }
}
